// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** 添加或更新账号池信息 PUT /api/Manager/account-createOrUpdate */
export async function putManagerAccountCreateOrUpdate(
  body: API.AccountInput,
  options?: { [key: string]: any }
) {
  return request<any>("/api/Manager/account-createOrUpdate", {
    method: "PUT",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 取得所有活动用户 GET /api/Manager/account-list */
export async function getManagerAccountList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getManagerAccountListParams,
  options?: { [key: string]: any }
) {
  return request<API.AccountDto[]>("/api/Manager/account-list", {
    method: "GET",
    params: {
      // isActive has a default value: true
      isActive: "true",
      ...params,
    },
    ...(options || {}),
  });
}

/** 设置账号状态 PUT /api/Manager/account-setStatus */
export async function putManagerAccountSetStatus(
  body: API.AccountStatusInput,
  options?: { [key: string]: any }
) {
  return request<any>("/api/Manager/account-setStatus", {
    method: "PUT",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取订单列表 POST /api/Manager/getOrders */
export async function postManagerGetOrders(
  body: API.GetOrderInput,
  options?: { [key: string]: any }
) {
  return request<API.OrderDto[]>("/api/Manager/getOrders", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 获取商品列表 POST /api/Manager/getProducts */
export async function postManagerGetProducts(
  body: API.GetProductInput,
  options?: { [key: string]: any }
) {
  return request<API.ProductMointerLogDto[]>("/api/Manager/getProducts", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 三方账号登录 POST /api/Manager/thirdpart-login */
export async function postManagerThirdpartLogin(
  body: API.AccountBasicInput,
  options?: { [key: string]: any }
) {
  return request<API.LoginResultInfo>("/api/Manager/thirdpart-login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 同步账号基本信息到三方服务器 POST /api/Manager/thirdpart-sync */
export async function postManagerThirdpartSync(
  body: API.AccountBasicInput,
  options?: { [key: string]: any }
) {
  return request<any>("/api/Manager/thirdpart-sync", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
